'''
    Python 链表 

'''
class LinkedList(object):
    def __init__(self,x):
        self.val =x
        self.next = None
        
    def createLinkedList(arr:'list[int]')->'LinkedList':
        if arr is None or len(arr) ==0 :
            return None
        head = LinkedList(0)
        cur = head
        for i in arr:
            cur.next = LinkedList(i)
            cur = cur.next
        

if __name__ =='__main__':
    l1 = LinkedList.createLinkedList([1,3,5,7,8])
    print(l1)